package com.system.web.entity;

import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.databind.DeserializationFeature;

/**
 * 
 * @Description: Override com.fasterxml.jackson.databind.ObjectMapper
 * @Author <a href="lizongxian@wxchina.com">ZongXian.Li </a>
 * @Date 2015年8月25日
 * @Version 1.0.0
 */
public class ObjectMapper extends com.fasterxml.jackson.databind.ObjectMapper {
	/**
	 * 
	 */
	private static final long serialVersionUID = 8764614943196065794L;

	public ObjectMapper() {
		// 禁用空对象转换json校验
		// this.configure(SerializationFeature.FAIL_ON_EMPTY_BEANS, false);
		// 设置null值不参与序列化(字段不被显示)
		this.setSerializationInclusion(Include.NON_NULL);
		// 忽略未知属性
		this.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
	}
}
